<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div>
    <el-form ref="form" :model="s_pro" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 工序列表 </span>
      </div>
      <el-table :data="s_pro">
        <el-table-column label="" prop="process_id" width="80">
          <template slot-scope="scope">
            <el-button @click="$parent.$parent.closeFlowChartChoicProcess(scope.row['process_id'],scope.row['process_name']);" type="success" size="mini"><i class="fa fa-edit"></i>选择</el-button>
          </template>
        </el-table-column>
        <el-table-column label="#" align="center" type='index'>
        </el-table-column>
        <el-table-column label="工序条形码" prop="process_barcode">
        </el-table-column>
        <el-table-column label="工序名称" prop="process_name">
        </el-table-column>
        <el-table-column label="工序编号" prop="process_num">
        </el-table-column>
        <el-table-column label="变更状态" prop="process_state">
        </el-table-column>
        <el-table-column label="工序描述" prop="process_des">
        </el-table-column>
        <el-table-column label="工序管理员" prop="process_user">
        </el-table-column>
        <el-table-column label="开始时间" prop="process_begindate">
        </el-table-column>
        <el-table-column label="结束时间" prop="process_endate">
        </el-table-column>
      </el-table>
      <el-button @click="('')" type='success' size="mini"><i class='fa fa-check'></i>保存</el-button>
      <pagination v-show="total>0" :total="total" :limit.sync="pageSize" @pagination="getPage" />
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'FlowChartChoicProcess',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_pro: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/mes/product/TechnologyAction/flowChartChoicProcess?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
          this["l_class"] = this.loadTreeTable(this["l_class"], "pro_produce_id", "pro_produce_parent");
        })
      },
    },
  }
</script>
